<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>部门管理</title>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
<link href="../js/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- 可选的Bootstrap主题文件（一般不使用） -->
<script src="../js/bootstrap/css/bootstrap-theme.min.css"></script>
<link rel="stylesheet" type="text/css" href="../mycss/style.css" />
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->

<script src="../js/bootstrap/js/bootstrap.min.js"></script>
<script src="heyun.js"></script>
<style type="text/css">
 #menu{
    margin-left: 55%;
    
 }
/* #menu .table{
     border: 0px solid transparent !important;
 } */
</style>

<script type="text/javascript">
  $(function(){
	  getAllDept();
	  //getListRole();
  })
</script>
</head>
<body id="tablePage">
 <div>	
		<blockquote>
			<p class="twoType">组织架构</p>
		</blockquote> 	
		<hr/>
	<div class="btnChange">
	<div id="menu" >
	<table  class="table"  >
	 <tr>
	   <td>
	<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
	添加
    </button>
     <!-- 模态框（Modal） -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					添加部门
				</h4>
			</div>
			<div class="modal-body">
				   <form action="savedept" method="post" id="role">
				       <table class="table" border="0">
				           <tr>
				             <td>部门简称</td>
				             <td><input type="text" name="deptName" ></td>
				           </tr>
				            <tr>
				             <td>部门全程</td>
				             <td>
				               <input type="text" name="deptAllName" />
				             </td>
				           </tr>
				            <tr>
				             <td>部门简介</td>
				             <td>
				               <input type="text" name="deptIntro" />
				             </td>
				           </tr>
				            <tr>
				             <td>备注</td>
				             <td>
				              <textarea rows="10" cols="50" name="deptRemarks">
				              </textarea>
				             </td>
				           </tr>
				       </table>
				   </form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal" >取消添加
				</button>
				<button type="button" class="btn btn-primary" onclick="saveDept()">
					保存
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
    </div></td>
	   <td>
 <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#myModal1" onclick="getDeptName()">
	修改
 </button>
  <!-- 模态框（Modal） -->
  <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					角色修改
				</h4>
			</div>
			<div class="modal-body">
				   <form action="saveRole" method="post" id="deptMessage">
				       <table class="table" border="0">
				       <tr>
				         <td>部门编号</td>
				         <td><input type="text" name="deptId" readonly="readonly" id="deptNo"/></td>
				       </tr>
				          <tr>
				             <td>部门简称</td>
				             <td><input type="text" name="deptName" id="deptName"></td>
				           </tr>
				            <tr>
				             <td>部门全程</td>
				             <td>
				               <input type="text" name="deptAllName" id="deptAllName" />
				             </td>
				           </tr>
				            <tr>
				             <td>部门简介</td>
				             <td>
				               <input type="text" name="deptIntro" id="deptIntro" />
				             </td>
				           </tr>
				            <tr>
				             <td>备注</td>
				             <td>
				              <textarea rows="10" cols="50" name="deptRemarks" id="deptRemarks">
				              </textarea>
				             </td>
				           </tr>
				       </table>
				   
				   </form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal" >取消添加
				</button>
				<button type="button" class="btn btn-primary" onclick="updateDept()">
					保存
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
    </div>
 </td>
	<td>
<button class="btn btn-default btn-lg"  onclick="deleteDept()">
	删除
 </button>
	   </td>
	 </tr>
	
	</table>
	</div>
	</div>
	<div class="tableDiv">
		<form action=""  id="roleTable">
		<table id="conTable" class="table table-bordered">
  <tr class="info"><td></td><td></td><td>部门名称</td><td>部门简介</td><td>最后修改时间</td></tr>
			
		 </table>	
	</form>	
	</div>
</div>
</body>
</html>